import React, {Component} from 'react';
import {
    StyleSheet,
    View,
    Dimensions
} from 'react-native';
import Test1 from './components/Test1/index';
class TestPage1 extends Component {
    constructor(props){
        super(props);
        this.state = {
            name: "零三1",
            num: 0
        }
    }
    onViewClick(){
        this.setState({
            num: this.state.num + 1
        });
    }
    render(){
        const {name,num} = this.state
        return (
            <View style={styles.box}>
                <Test1 name={name} num={num} onViewClick={this.onViewClick.bind(this)}/>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    box:{
        width:Dimensions.get('window').width,
        height:Dimensions.get('window').height,
        alignItems:'center',
        justifyContent: 'center'
    }
})
 export default TestPage1;
